<!doctype html>
<html>
{include file="./public/admin/common/head_css.html" /}
<style>
    *{padding:0px;margin:0px;}
    .pop {  display: none;  width: 800px; min-height: 100px;  max-height: 750px;  height:400px;  position: absolute;  top: 0;  left: 0;  bottom: 0;  right: 0;  margin: auto;  padding: 25px;  z-index: 130;  border-radius: 8px;  background-color: #fff;  box-shadow: 0 3px 18px rgba(100, 0, 0, .5);  }
    .pop-top{  height:40px;  width:100%;  border-bottom: 1px #E5E5E5 solid;  }
    .pop-top h2{  float: left;  display:block}
    .pop-top span{  float: right;  cursor: pointer;  font-weight: bold; display:block}
    .pop-foot{  height:440px;  line-height:40px;  width:100%;  border-top: 1px #E5E5E5 solid;  text-align: right;  }
    .pop-cancel, .pop-ok {  padding:8px 15px;  margin:15px 5px;  border: none;  border-radius: 5px;  background-color: #337AB7;  color: #fff;  cursor:pointer;  }
    .pop-cancel {  background-color: #FFF;  border:1px #CECECE solid;  color: #000;  }
    .pop-content-right{  width:310px; height: 50px;  float: left;  padding-top:20px;  padding-left:20px;  font-size: 16px;  line-height:35px;  }
    .pop-content-right select{  width:100px; height: 30px;  float: left;  padding-top:2px;  padding-left:20px;  font-size: 16px;  line-height:35px;  }
    .bgPop{  display: none;  position: absolute;  z-index: 129;  left: 0;  top: 0;  width: 100%;  height: 100%;  background: rgba(0,0,0,.2);  }
</style>
<body>
{include file="./public/admin/common/header.html" /}
<div class="container clearfix">
    {include file="./public/admin/common/left.html" /}
    <!--/sidebar-->
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="index.html">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">作品管理</span></div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="#" method="post">
                    <table class="search-tab">
                        <tr>
                            <th width="70">关键字:</th>
                            <td><input class="common-text" placeholder="关键字" name="keyword" id="keyword" type="text"></td>
                            <td><input class="btn btn-primary btn2" value="查询" id="search" type="submit" lay-submit="" lay-filter="search"></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                        <a href="javascript:void(0)" onclick="role_add()"><i class="icon-font"></i>新增角色</a>
                        <a id="batchDel" href="javascript:void(0)" onclick="role_dels(1)"><i class="icon-font"></i>批量删除</a>
                        <a id="outOrd" href="javascript:void(0)" onclick="all_status_compose(0)"><i class="icon-font"></i>批量导出</a>
                        <a id="inOrd" href="javascript:void(0)" onclick="all_status_compose(0)"><i class="icon-font"></i>批量导入</a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th class="tc" width="5%"><input class="allChoose" name="" id="allChk" type="checkbox"></th>
                            <th width="20px">角色名</th>
                            <th width="20px">角色权限</th>
                            <th width="20px">控制方法</th>
                            <th width="20px">操作</th>
                        </tr>
                        <tbody id="role_list">
                        </tbody>

                    </table>
                    <div id="pages"></div>
                </div>
            </form>
        </div>
    </div>
    <!--/main-->
</div>
</body>

<!--遮罩层,修改角色信息-->
<div class="bgPop"></div>
<!--弹出框-->
<div class="pop">
    <div class="pop-top">
        <h2>更改角色</h2>
        <span class="pop-close" onclick="outcli()">Ｘ</span>
    </div>
    <div style="height: 300px">
        <table>
            <tr>
                <td style="padding-top: 20px"><i class="require-red">*</i>角色名称：</td>
                <td style="padding-top: 20px">
                    <input type="hidden" value="" id="role_id">
                    <input class="common-text required" id="role_name" name="title" size="20" value="" type="text">
                </td>
            </tr>
            <tr  >
                <td width="120"><i class="require-red">*</i>分配权限：</td>

                <td style="padding-top: 20px">
                    {volist name='auth_infoA' id='a'}
                    <p>
                        <input name="checkid" id="access_check[]" value="{$a.auth_id}" type="checkbox">{$a.auth_name}<br>
                        {volist name='auth_infoB' id='b'}
                        {if condition="$a.auth_id eq $b.auth_pid" }
                        <b id="$b.auth_pid" >
                            <input  name="checkid" id="_check[]" type="checkbox" value="{$b.auth_id}">{$b.auth_name}
                        </b>
                        {/if}
                        {/volist}
                    </p>
                    {/volist}
                </td>
            </tr>
            <tr>
        </table>
    </div>
    <div class="pop-foot">
        <input type="button" value="取消" onclick="outcli()" class="pop-cancel pop-close">
        <input type="button" value="确定" onclick="role_update()" class="pop-ok">
    </div>
</div>

{include file="./public/admin/common/JS.html" /}
<script src="__static__/js/user/roleList.js"></script>
<script>
    var keyword = $('#keyword').val();
    getRoleListPage(url_list.role_list,keyword);

    $(function () {
        $('#search').click(function () {
            var keyword =$('#keyword').val();
            getRoleListPage(url_list.role_list,keyword);
            return false;
        });
        $('#role_id').change(function () {
            var keyword =$('#keyword').val();
            getRoleListPage(url_list.role_list,keyword);
            return false;
        })
    })
</script>
</html>